<div class="widget grid12">    
    <div class="whead"><h6>INGRESO DE NUEVO PLANO AL PO: <?php echo $orden['Ordene']['nombre']; ?></h6><div class="clear"></div></div>       
    <?php echo $this->Form->create('Plano', array('id' => "validate")); ?>  
    <?php echo $this->Form->hidden('ordene_id', array('value' => $idOrden)); ?>
    
     <div class="formRow">
        <div class="grid3"><label>Transmittal<span class="req">*</span></label></div>
        <div class="grid9">
            <?php echo $this->Form->text('Plano.transmital', array('placeholder' => 'Inserte el Transmital', "class" => "validate[required]")); ?>
        </div>
        <div class="clear"></div>
    </div>
    
    <div class="formRow">
        <div class="grid3"><label>Proyecto<span class="req">*</span></label></div>
        <div class="grid9">
            <?php echo $this->Form->text('Plano.proyecto', array('placeholder' => 'Inserte el Proyecto Ej:C-479', "class" => "validate[required]")); ?>
        </div>
        <div class="clear"></div>
    </div>
    
    <div class="formRow">
        <div class="grid3"><label>Fecha</label></div>
        <div class="grid9">
            <?php echo $this->Form->text('Plano.fecha', array('id'=>'fecha', 'placeholder' => 'Inserte el Fecha')); ?>
        </div>
        <div class="clear"></div>
    </div>   

    <div class="formRow">
        <div class="grid3"><label>No. Cajon</label></div>
        <div class="grid9">
            <?php echo $this->Form->text('Plano.lugar', array('placeholder' => 'Inserte el numero Ej: 2')); ?>
        </div>
        <div class="clear"></div>
    </div>  

    <div class="formRow">
        <div class="grid3"><label>Observaciones</label></div>
        <div class="grid9">
            <?php echo $this->Form->text('Plano.observaciones', array('placeholder' => 'Inserte las observaciones')); ?>
        </div>
        <div class="clear"></div>
    </div>    
    
     <!-- sheepIt Form -->
    <div id="sheepItForm">
        <!-- Form template-->
        <div id="sheepItForm_template">
            <div class="formRow">
                <div class="grid2"><label><span id="sheepItForm_label"></span>.- Document ID:</label></div>
                <div class="grid2 moreFields allUpper">
                    <?php 
                        echo $this->Form->text('PlanosTag.#index#.tag_id', array('placeholder' => 'Documento ID', "class" => "validate[required]")); 
                    ?>
                    <a id="sheepItForm_remove_current" style="float: left">
                        X<img class="delete" src="/images/cross.png" width="16" height="16" border="0">
                    </a>
                </div>                
                
                <div class="clear"></div>                 
            </div>
        </div>   
        <!-- /Form template-->                  
        <!-- No forms template -->
        <div id="sheepItForm_noforms_template">Ningun Document</div>
        <!-- /No forms template-->

        <!-- Controls -->
        <div id="sheepItForm_controls">
            <div id="sheepItForm_add"><a class="buttonS bGreen"><span>(+)Mas Tags</span></a></div>
                <p></p>
            <div id="sheepItForm_remove_last"><a class="buttonS bRed"><span>(-)Quitar</span></a></div>
            <div id="sheepItForm_remove_all"><a class="buttonS bRed"><span>(-)Quitar Todos</span></a></div>
            <div id="sheepItForm_add_n">
                <input id="sheepItForm_add_n_input" type="text" size="4" style="border: 1px solid #006;"/>
                    <p></p>
                <div id="sheepItForm_add_n_button"><a class="buttonS bGold"><span>Anadir</span></a></div></div>
        </div>
        <!-- /Controls -->

    </div>
    <!-- /sheepIt Form -->          

    <div class="clear"></div>

</div>

<div class="actions-right">
    <?php
    $options = array('label' => 'Guardar Datos', 'class' => 'buttonS bLightBlue', 'id' => 'btEnvia');
    echo $this->Form->end($options);
    ?> 

<?php echo $this->Html->link("Volver &raquo;", array('controller' => 'Ordenes', 'action' => 'index'), array('class' => 'buttonS bLightBlue', 'escape' => FALSE)); ?>       
</div>

<script>
    $(document).ready(function() {
        
        $( "#fecha" ).datepicker({
            defaultDate: +7,
            showOtherMonths:true,
            autoSize: true,
            /*appendText: '(Ano-Mes-Dia)',*/
            dateFormat: 'yy-mm-dd',
            changeMonth: true,
            changeYear: true
        });                                                                                        
        
        var sheepItForm = $('#sheepItForm').sheepIt({
            separator: '',
            allowRemoveLast: true,
            allowRemoveCurrent: true,
            allowRemoveAll: true,
            allowAdd: true,
            allowAddN: true,
            maxFormsCount: 150,
            minFormsCount: 1,
            iniFormsCount: 1,
            continuousIndex: true
        });         
                                                
    } );                     
</script>